The present invention relates generally to network systems using redundant or standby devices working together in a redundancy group and load distributing arrangement to provide virtual router service. More particularly, the present invention relates to methods and apparatus for providing network address translation services while allowing the forwarding of packets using a load distributing virtual router.
Private and/or local networks are commonly connected to the Internet through one or more gateway devices (for example, routers) so that hosts (PCs or other arbitrary network entities) on the local network can communicate with nodes on the Internet. Typically, the host will send packets to locations identified using an address (for example, an Internet Protocol or “IP” address) both within its local network and on the Internet. To receive packets from the Internet, a local network or a host on that network must have a globally unique address. Typically, each such address uses a four octet format to generate a 32-bit IP address. These IP addresses often are presented in a dotted decimal format, with each octet written as a decimal integer separated from other octets by decimal points.
Global IP addresses have been issued to enterprises by a central authority known as the Internet Assigned Number Authority (“IANA”). The IANA has issued such addresses in one of three commonly used classes. Class A IP addresses employ their first octet as a “netid” and their remaining three octets as a “hostid.” The netid identifies the enterprise network and the hostid identifies a particular host on that network. As three octets are available for specifying a host, an enterprise having class A addresses has 224 (nearly 17 million) addresses at its disposal for use with possible hosts. Thus, even the largest companies vastly underuse available class A addresses. Not surprisingly, Class A addresses are issued to only very large entities. Class B addresses employ their first two octets to identify a network (the netid) and their second two octets to identify a host (the hostid). Thus, an enterprise having class B addresses can use those addresses on approximately 64,000 hosts. Finally, class C addresses employ their first three octets as a netid and their last octet as a hostid. Only 254 host addresses are available to enterprises having a single class C netid.
There has been a substantial proliferation of hosts on the Internet, coupled with so many class A and B licenses issued to large entities, that it is now nearly impossible to obtain a class B address. Many organizations now requiring Internet access have far more than 254 hosts—for which unique IP addresses are available with a single class C network address. It is more common for a mid to large size enterprise to have 1,000 to 10,000 hosts. Such companies simply can not obtain enough IP addresses for each of their hosts.
To address this problem, a Network Address Translation (“NAT”) protocol has been developed. See K. Egevang and P. Francis, “The IP Network Address Translator (NAT),” Request For Comments “RFC” 1631, Cray Communications, NTT, May 1994 which is incorporated herein by reference for all purposes. NAT is based on the concept of address reuse by and within local networks, and operates by mapping reusable (also referred to as “local” or “private”) IP addresses (see, RFC 1918, referenced and incorporated below) of a leaf or stub domain to globally unique addresses which are required for communication with hosts on the Internet. IP addresses used within local networks can be reusable, non-unique IP addresses, in accordance for example with RFC 1918, Y. Rekhter et al., “Address Allocation for Private Internets,” Request For Comments “RFC” 1918, Cisco Systems et al., February 1996, which is incorporated herein by reference for all purposes.
In implementation, a local host wishing to access the Internet receives a temporary IP address from a pool of such addresses available to the enterprise (for example, 254 class C addresses). While the host is sending and receiving packets on the Internet, it has a global IP address which is unavailable to any other host. After the host disconnects from the Internet, the enterprise can take back the global IP address and make it available to other hosts wishing to access public networks or the Internet. Through NAT mappings, global IP addresses can be assigned to hosts using private IP addresses. These mappings can be maintained by routers or other gateway devices that separate the local network from a public network like the Internet. To implement a NAT, a translation system must be provided between the enterprise local network and the Internet (or other public network). For this reason, NAT services are implemented at gateway positions.
As noted above, local area networks (LANs) are commonly connected with one another through one or more routers so that a host (a PC or other arbitrary LAN entity) on one LAN can communicate with other hosts on different LANs. Typically, the host is able to communicate directly only with the entities on its local LAN segment. When it needs to send a data packet to an address that it does not recognize as being local, it communicates through a router (or other layer-3 or gateway device) which determines how to direct the packet between the host and the destination address in a remote network. Unfortunately, a router may, for a variety of reasons, become inoperative (for example, a power failure, rebooting, scheduled maintenance, etc.) creating a trigger event. Such potential router failure has led to the development and use of redundant systems, which have more than one router to provide a back up in the event of primary router failure. When a router fails in such a redundancy system, the host communicating through the inoperative router may still remain connected to other LANs by sending packets to another router connected to the host's LAN.
Logically, such a system can resemble FIG. 1A. In FIG. 1A, a local network 130 uses a single gateway 110 to forward outbound packets for hosts 120, 122, 124 when those packets are bound for an outside network 150 (for example, the Internet). As seen in FIG. 1B, however, the actual physical configuration of a redundancy group system 100 uses several routers 112, 114, 116, 118 to implement a redundancy group that functions as the single virtual gateway 110 for hosts 120, 122, 124.
Various protocols have been devised to allow a host to choose a router from among a group of routers in a network. Two of these, Routing Information Protocol (or RIP) and ICMP Router Discovery Protocol (IRDP) are examples of protocols that involve dynamic participation by the host. However, because both RIP and IRDP require that the host be dynamically involved in the router selection, performance may be reduced and special host modifications and management may be required.
In a widely used and somewhat simpler approach, the host recognizes only a single “default” router. Hosts (for example, workstations, users and/or data center servers) using the IP protocol utilize this default gateway to exit a local network and access remote networks. Therefore, each host must have prior knowledge of the gateway's IP address which typically is a router or layer-3 switch IP address. Hosts are either statically configured with the IP address of the default gateway or are assigned the address through a configuration protocol (such as Cisco's DHCP) upon boot-up. In either case, the host uses the same default gateway IP address for all network traffic destined to exit the local network.
To forward traffic to the default gateway, the host must perform an IP-ARP resolution to learn the data-link Media Access Control (MAC) address of the default gateway. The host sends an ARP inquiry to the IP address of the gateway, requesting the gateway's MAC address. The default gateway will respond to the host's ARP request by notifying the host of the gateway's MAC address. The host needs the default gateway's MAC address to forward network traffic to the gateway via a data-link layer transfer. When only a single gateway device is used, that device returns its own “burned in” (BIA) MAC address as the address for the host's outbound packets.
In this approach, the host is configured to send data packets to the default router when it needs to send packets to addresses outside its own LAN. It does not keep track of available routers or make decisions to switch to different routers. This requires very little effort on the host's part, but has a serious danger. If the default router fails, the host cannot send packets outside of its LAN. This may be true even though there may be a redundant router able to take over, because the host does not know about the backup. Unfortunately, such systems have been used in mission critical applications such as stock trading.
The shortcomings of these early systems led to the development and implementation of redundant gateway systems, which provide for failover in gateway settings. One such system is the hot standby router protocol (HSRP) by Cisco Systems, Inc. of San Jose, Calif. A more detailed discussion of the earlier systems and of an HSRP type of system can be found in U.S. Pat. No. 5,473,599 (referred to herein as “the '599 Patent”), entitled STANDBY ROUTER PROTOCOL, issued Dec. 5, 1995 to Cisco Systems, Inc., which is incorporated herein by reference in its entirety for all purposes. Also, HSRP is described in detail in RFC 2281, entitled “Cisco Hot Standby Router Protocol (HSRP)”, by T. Li, B. Cole, P. Morton and D. Li, which is incorporated herein by reference in its entirety for all purposes.
HSRP is widely used to back up primary routers for a network segment. In HSRP, a “standby” router is designated as the backup to an “active” router. The standby router is linked to the network segment or segments serviced by the active router. The active and standby routers share a “virtual IP address” and possibly a “virtual Media Access Control (MAC) address” which is actually in use by only one router at a time. All internet communication from the relevant local network employs the virtual IP address (also referred to as a “vIP address”) and the virtual MAC address (also referred to as a “vMAC address”). At any given time, the active router is the only router adopting and using the virtual address(es). Then, if the active router should cease operation for any reason, the standby router immediately takes over its load (by adopting the virtual addresses). This allows the host to always direct data packets to an operational router without monitoring the routers of the network.
One drawback to HSRP systems in general is that only one gateway device in a redundancy group is in use at any given time. To better utilize system resources in such redundancy systems, a gateway load balancing protocol (GLBP) was developed by Cisco and is the subject of commonly owned and copending U.S. Ser. No. 09/883,674 filed Jun. 18, 2001, entitled GATEWAY LOAD BALANCING PROTOCOL, which is incorporated herein by reference in its entirety for all purposes. The terms “load sharing” and “load distribution” and the like herein mean the ability to assign outgoing traffic to multiple gateway devices so that a single gateway device is not responsible for all outbound packets from all hosts on a LAN.
Like HSRP, for communications directed outside of a LAN, GLBP uses a virtual IP address shared by multiple gateway devices (for example, routers) in a redundancy group. These various routers share a common, virtual IP address (also referred to as a “vIP address”), but maintain actual IP addresses as well (also referred to as “aIP addresses”). Each gateway device also has its own BIA (actual) MAC address (also referred to herein as an “aMAC address) and a virtual MAC address (also referred to herein as a “vMAC address”). The use of vMAC addresses allows interchangeability of routers without the need for reprogramming of the system.
Each GLBP system has a “master” gateway device (also referred to herein as an “Active Virtual Gateway” or AVG device) in the redundancy group that controls address assignment (ARP responses) and failover features. The AVG instructs an ARPing host to address outgoing communications to a virtual MAC address assigned to one of the redundancy group gateway devices (gateway devices not functioning as a master device may be referred to as “standby” and/or “slave” gateway devices, in accordance with standard GLBP nomenclature and operation). Any gateway device that is forwarding packets is referred to herein as an “Active Virtual Forwarder” or AVF device. Each redundancy group therefore has one AVG device and one or more AVF devices.
More specifically, a host sends an ARP message to the redundancy group's virtual IP address when the host wants to send a packet outside the local network. The AVG selects an AVF to handle outgoing packets for the host and sends the host a reply message containing the vMAC of the AVF selected by the AVG. The host populates its ARP cache with this vMAC address. Thereafter, host addresses its outbound packets to the vMAC address in its ARP cache, thus sending these packets to the assigned AVF/router.
Hosts can be assigned vMAC addresses by random assignment, round robin assignment or by using another prescribed algorithm or methodology. In the event that an assigned AVF of the group fails, the outgoing communications that were to be handled by the failed AVF must be sent elsewhere. Upon failure of the originally assigned AVF, the failed AVF's vMAC address is reassigned to another AVF. Thereafter, outgoing packets from the host (and any other host(s) which send packets to the reassigned vMAC address) are routed instead to the new owner of that newly reassigned vMAC address. In the event that the AVG itself fails, additional steps are taken to appoint or elect a new AVG and ensure continuity in the load distribution function.
If, however, the failed gateway device was also providing translation services to the host using NAT, that translation database or other information is consequently lost or otherwise inaccessible to the AVF to which the failed AVF's vMAC address has been assigned. Therefore, due to the structure and operation of load sharing schemes such as Cisco's GLBP system, NAT (translation) services have not been provided simultaneously.
In view of the foregoing, it would be desirable to provide NAT services for communications from outside a local network while ensuring that redundant, load sharing gateway services are still available for the local network.